﻿Imports System.Collections.ObjectModel
Imports OMANE.Common.Model.Interfaces
Imports PTIC_GestionBDD
Imports PTIC_Util

Public Class ReferentielTablesMortalite
    Inherits ReferentielTablesTravail
    Implements OMANE.Common.Model.Interfaces.IReferentielTablesMortalite

    Private m_Connection As IConnection
    Private m_ListeTraitements As ListeTraitementsBase(Of String)

    Public Sub New(ByVal InfosTables As ReadOnlyCollection(Of IInfoTableReferentiel),
                   ByVal ListeTraitements As ListeTraitementsBase(Of String))
        MyBase.New(InfosTables)
        m_ListeTraitements = ListeTraitements
    End Sub

    Private m_FactoryMortalite As TablesMortaliteFactory
    Public ReadOnly Property Factory As Actuariat.ITablesMortaliteFactory Implements Interfaces.IReferentielTablesMortalite.Factory
        Get
            If m_FactoryMortalite Is Nothing Then
                m_FactoryMortalite = New TablesMortaliteFactory(InfoTables, m_ListeTraitements)
            End If
            Return m_FactoryMortalite
        End Get
    End Property

    Public ReadOnly Property TraitementsFactory As Interfaces.IReferentielTablesTravailTraitements Implements Interfaces.IReferentielTablesMortalite.Traitements
        Get
            If m_FactoryMortalite Is Nothing Then
                m_FactoryMortalite = New TablesMortaliteFactory(InfoTables, m_ListeTraitements)
            End If
            Return m_FactoryMortalite
        End Get
    End Property
End Class